/*
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-08-08 14:33:39
 * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
 * @LastEditTime: 2022-09-05 20:51:34
 * @FilePath: \project\pyy\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import BasicLayout from "@/layouts/BasicLayout.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/tel",
    name: "Tel",
    component: () => import("@/views/telephone"),
  },
  // 需求计划
  {
    path: "/demand",
    name: "Demand",
    component: () => import("@/views/demand"),
  },
  // 新增需求
  {
    path: "/demandAdd",
    name: "DemandAdd",
    component: () => import("@/views/demand/add.vue"),
  },
  // 需求详情
  {
    path: "/demandDetails",
    name: "DemandDetails",
    component: () => import("@/views/demand/details.vue"),
  },
  // 情报查询
  {
    path: "/intelligenceInquiry",
    name: "IntelligenceInquiry",
    component: () => import("@/views/intelligenceInquiry"),
  },
  // 查新申请
  {
    path: "/intelligenceInquiryAdd",
    name: "IntelligenceInquiryAdd",
    component: () => import("@/views/intelligenceInquiry/add.vue"),
  },
  // 查新申请详情
  {
    path: "/intelligenceInquirydDetails",
    name: "IntelligenceInquiryDetails",
    component: () => import("@/views/intelligenceInquiry/details.vue"),
  },
  // 采购询比价
  {
    path: "/purchase",
    name: "Purchase",
    component: () => import("@/views/purchase"),
  },
    // 查看历史报价
  {
    path: "/viewHistoricalQuote",
    name: "viewHistoricalQuote",
    component: () => import("@/views/purchase/viewHistoricalQuote.vue"),
  },
  // 查看历史报价 物资明细
  {
    path: "/viewHistoricalQuoteDetail",
    name: "viewHistoricalQuoteDetail",
    component: () => import("@/views/purchase/quoteMaterialDetailed.vue"),
  },
    // 查看历史报价 物资明细的明细
    {
      path: "/historicalQuoteDetail",
      name: "historicalQuoteDetail",
      component: () => import("@/views/purchase/historicalQuoteDetail.vue"),
    },
  // 询价比详情
  {
    path: "/purchaseDetails",
    name: "PurchaseDetails",
    component: () => import("@/views/purchase/details.vue"),
  },
  // 质量要求详情
  {
    path: "/qualityDetail",
    name: "QualityDetail",
    component: () => import("../views/purchase/qualityDetail.vue"),
  },

  /***** 物理分析 ******/
  {
    path: "/physics",
    component: BasicLayout,
    children: [
      {
        path: "",
        name: "Physics",
        component: () => import("@/views/physics/home/index.vue"),
      },
      {
        path: "/physics/add",
        name: "PhysicsAdd",
        component: () => import("@/views/physics/add/index.vue"),
      },
      {
        path: "/physics/detail",
        name: "PhysicsDetail",
        component: () => import("@/views/physics/detail/index.vue"),
      },
      {
        path: "/physics/waitePage",
        name: "waitePage",
        component: () => import("@/views/physics/home/waitePage.vue"),
      },
    ],
  },

  /***** 化学分析 ******/
  {
    path: "/chemistry",
    component: BasicLayout,
    children: [
      {
        path: "",
        name: "Chemistry",
        component: () => import("@/views/chemistry/home/index.vue"),
      },
      {
        path: "/chemistry/add",
        name: "ChemistryAdd",
        component: () => import("@/views/chemistry/add/index.vue"),
      },
      {
        path: "/chemistry/detail",
        name: "ChemistryDetail",
        component: () => import("@/views/chemistry/detail/index.vue"),
      },
    ],
  },

  /***** 设备维修 ******/
  {
    path: "/instandhaltung",
    component: BasicLayout,
    children: [
      {
        path: "",
        name: "Instandhaltung",
        component: () => import("@/views/instandhaltung/home/index.vue"),
      },
      {
        path: "/instandhaltung/add",
        name: "InstandhaltungAdd",
        component: () => import("@/views/instandhaltung/add/index.vue"),
      },
      {
        path: "/instandhaltung/detail",
        name: "InstandhaltungDetail",
        component: () => import("@/views/instandhaltung/detail/index.vue"),
      },
    ],
  },

  /***** 设备计量 ******/
  {
    path: "/equipment",
    component: BasicLayout,
    children: [
      {
        path: "",
        name: "Equipment",
        component: () => import("@/views/equipment/home/index.vue"),
      },
      {
        path: "/equipment/add",
        name: "EquipmentAdd",
        component: () => import("@/views/equipment/add/index.vue"),
      },
      {
        path: "/equipment/detail",
        name: "EquipmentDetail",
        component: () => import("@/views/equipment/detail/index.vue"),
        meta:{
          keepAlive: true
        },
      },
      {
        path: "/equipment/detail/enclosure",
        name: "EquipmentDetailEnclosure",
        component: () => import("@/views/equipment/detail-enclosure/index.vue"),
      },
    
    ],
  },
];

const router = new VueRouter({
  routes,
  // mode: 'history'
},

);

export default router;
